package vip.liux.contracts.models.point;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Table;
import lombok.Getter;
import lombok.Setter;
import vip.liux.domain.entities.auditing.AuditedEntity;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Entity
@Table(name = "shop_points_detail")
@Getter
@Setter
public class PointsDetail extends AuditedEntity<Long> {
    @Column(name = "user_id", nullable = false)
    private Long userId;

    @Column(name = "points", nullable = false)
    private BigDecimal points;

    @Column(name = "expiry_time")
    private LocalDateTime expiryTime;

    @Column(name = "rule_code", nullable = false, length = 64)
    private String ruleCode;

    @Column(name = "transaction_no", nullable = false, length = 64)
    private String transactionNo;
}